package com.jxtc.enterprise.tenant.dto.deliveryTaskTemplate;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;

@Getter
@Setter
@ToString
public class DeliveryTaskCreateDTO {
    @NotBlank(message = "公司 ID 不能为空")
    private String companyId;

    @NotBlank(message = "用餐时段不能为空")
    private String mealType;

    @NotBlank(message = "配送开始时间不能为空")
    private String deliveryTime;

    @NotBlank(message = "配送员 ID 不能为空")
    private String riderId;

    @NotEmpty(message = "取餐店铺 ID 列表不能为空")
    @Size(min = 1, message = "取餐店铺 ID 列表至少需要包含一个元素")
    private List<String> storeIds;

    @Valid
    @NotNull(message = "配送费用不能为空")
    private DeliveryCostDTO deliveryCost;

    @Min(value = 1, message = "配送顺序不能小于 1")
    private Integer deliveryOrder = 10;
}
